Some of this can be adapted from what we generated for Kan-ed.